
<%@ page import="your_car_status.Inventory" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html>
  
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>New Inventory</title>
    <meta name="layout" content="main">
  </head>
  <body>
    <br>
    <g:link class="list" action="create">
      <div class="tabNoSelected">
        New Inventory
      </div>
    </g:link>
  
    <g:link class="list" action="list">
      <div class="tabSelected">
        Inventory
      </div>
    </g:link>
  
    <g:link class="list" action="logout" controller="LogIn">
      <div class="tabNoSelected">Log Out</div>
    </g:link>
	
  
		<a href="#list-inventory" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div id="list-inventory" class="content scaffold-list" role="main">
			<h1><g:message code="List Inventory" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<table>
				<thead>
					<tr>
					
                                  		<g:sortableColumn property="date" title="${message(code: 'inventory.date.label', default: 'Date')}" />

						<g:sortableColumn property="engineOilLevel" title="${message(code: 'inventory.engineOilLevel.label', default: 'Engine Oil Level')}" />
					
						<g:sortableColumn property="fuelLevel" title="${message(code: 'inventory.fuelLevel.label', default: 'Fuel Level')}" />
					
						<g:sortableColumn property="airC" title="${message(code: 'inventory.airC.label', default: 'Air C')}" />
					
						<g:sortableColumn property="antena" title="${message(code: 'inventory.antena.label', default: 'Antena')}" />
					
						<g:sortableColumn property="apron" title="${message(code: 'inventory.apron.label', default: 'Apron')}" />
					
						<g:sortableColumn property="ashtray" title="${message(code: 'inventory.ashtray.label', default: 'Ashtray')}" />
					
					</tr>
				</thead>
				<tbody>
				<g:each in="${inventoryInstanceList}" status="i" var="inventoryInstance">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
					
						<td><g:link action="show" id="${inventoryInstance.id}">${fieldValue(bean: inventoryInstance, field: "date")}</g:link></td>
					
                                                <td>${fieldValue(bean: inventoryInstance, field: "engineOilLevel")}</td>
                                                
						<td>${fieldValue(bean: inventoryInstance, field: "fuelLevel")}</td>
					
						<td><g:formatBoolean boolean="${inventoryInstance.airC}" /></td>
					
						<td><g:formatBoolean boolean="${inventoryInstance.antena}" /></td>
					
						<td><g:formatBoolean boolean="${inventoryInstance.apron}" /></td>
					
						<td><g:formatBoolean boolean="${inventoryInstance.ashtray}" /></td>
					
					</tr>
				</g:each>
				</tbody>
			</table>
			<div class="pagination">
				<g:paginate total="${inventoryInstanceTotal}" />
			</div>
		</div>
               	<fieldset class="buttons">
			<g:link class="save" controller="admin" action="listVehicle">Return</g:link>
		</fieldset>
	</body>
</html>
